<template>
  <tr>
    <td><label><input type="checkbox" :checked="goods.checked" @change="$emit('dealcheck',$event.target.checked)"></label></td>
    <td>{{goods.name}}</td>
    <td>{{goods.price}}</td>
    <td><button @click="$emit('dealnum',goods.num-1)">-</button> {{goods.num}} <button @click="$emit('dealnum',goods.num+1)">+</button></td>
    <td>{{goods.price*goods.num}}</td>
    <td><button @click="$emit('dealdel',goods.name)">删除</button></td>
  </tr>
</template>
 
<script>
export default {
  name: "MyCart",
  components: {},
  props: {
    goods:{
      type:Object,
      required:true,
    }
  },
  data() {
    return {};
  },
  computed: {},
  watch: {},
  created() {},
  methods: {}
};
</script>

<style scoped>
     
</style>